﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once
#include "GcmpModelInterface.h"
#include "IObject.h"

namespace gcmp
{
    class InPlaceEditRecord;
    class IDocument;

    /// \brief 在位编辑管理器
    FINAL_INTERFACE class GCMP_MODEL_INTERFACE_EXPORT IInPlaceEditManager : public IObject
    {
        DEFINE_CAST_DERIVED(gcmp::IInPlaceEditManager, gcmp::IObject)

    public:
        /// \brief 获取在位编辑管理器
        /// \return 在位编辑管理器指针
        static IInPlaceEditManager* Get();

        /// \brief 获取指定文档的在位编辑记录
        ///
        // \param pHostDocOrInPlaceDoc 在位编辑主文档或编辑的文档
        // \return 获取的在位编辑记录
        virtual const InPlaceEditRecord* FindRecord(IDocument* pHostDocOrInPlaceDoc) const = 0;
    };
}
